package com.seata.demo.service.client;

import java.math.BigDecimal;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.seata.demo.util.res.Resp;

/**
* @comments
* @author  zg
* @date 2021年2月9日
*/
@FeignClient(name = "account")
@RequestMapping("/account/rest-service/")
public interface AccountServiceClient {
    
    /**
     * 扣减用户账户余额
     * @author zg
     * @date 2021年2月9日 
     * @param userId
     * @param deductMoney
     * @return
     */
    @PostMapping("deduct-balance")
    Resp<?> deductBalance(@RequestParam String userId, @RequestParam BigDecimal deductMoney);

}
